<?php defined('SYSPATH') OR die('No direct access allowed.');

class Fieldset_Plugin extends WB_FormItem {
	
	public function __construct($name='', $params=array())
	{
		parent::__construct($name, $params);
		
		$this->form_columns = null;
		$this->table_columns = null;
		$this->db_columns = null;
		
		$this->build($this->params['form'], $this->db_table);
		unset($this->params['form']);
	}
	
	public function render_item()
	{
		$str = $this->prefix;
		$str .= form::open_fieldset($this->value, html::attributes($this->attributes));
		if ($this->label) $str .= form::legend($this->label);
		foreach ($this->fields as $field) $str .= $field->render_item();
		$str .= form::close_fieldset();
		$str .= $this->suffix;
		
		return $str;
	}
	
	public function get_display_name() {return null;}
	
	public function render_cell() {return null;}
	
	public function prep_db() {return null;}
	
	
}

//End of Fieldset_Plugin Library